app.controller('IngredientsCtrl',['$scope',function($scope){
    $scope.addIngredient=function(){
        var ingredients=$scope.data.ingredients;
        ingredients[ingredients.length]={};
    };

    $scope.removeIngredient=function(index){
        $scope.recipe.ingredients.splice(index,1);
    };
}]);